//
//  HWGameCollectYXCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2019/10/23.
//  Copyright © 2019 Chendaobin. All rights reserved.
//

#import "HWGameCollectYXCell.h"

@implementation HWGameCollectYXCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.icoimageView.layer.cornerRadius = 8;
    self.icoimageView.layer.masksToBounds = YES;
    
    self.shoucangBut.layer.cornerRadius = 12;
    self.shoucangBut.layer.masksToBounds = YES;
    self.shoucangBut.backgroundColor = blueBackgroundBT;
    self.shoucangBut.hidden = YES;
    
      self.leixingLabel.layer.cornerRadius = 3;
      self.leixingLabel.layer.masksToBounds = YES;
    
    
    self.shanchuBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    self.shanchuBtn.frame = CGRectMake(kScreenW -73-13, 23, 80, 25);
    [self.shanchuBtn setTitle:@"取消收藏" forState:UIControlStateNormal];
    self.shanchuBtn.layer.cornerRadius = 12;
    self.shanchuBtn.layer.masksToBounds = YES;
    [self.shanchuBtn  setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.shanchuBtn.titleLabel.font = [UIFont systemFontOfSize:12];
    self.shanchuBtn.backgroundColor = QCchunseshensetupian;
    [self.contentView addSubview:self.shanchuBtn];

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setModel:(HWGameCollectModel *)model {
    
    _model = model;
    self.nameLabel.text = model.name;
    NSURL *url = [NSURL URLWithString:model.icon];
    [self.icoimageView sd_setImageWithURL:url placeholderImage:nil];
    self.daxiaoLabel.text = model.size;
  //  self.datelabel.text = [NSString stringWithFormat:@"| %@",];
    self.datelabel.hidden = YES;
    
    if (model.biaoqian.count > 0) {
        self.leixingLabel.text = model.biaoqian[0];
        
    }
    
    
}

@end
